package com.lkm.app_ui.m.Imple.secondScreenManager;

import com.lkm.app_ui.log.SystemLogger;
import com.lkm.app_ui.m.display_second.DisplaySecondModule;
import com.lkm.app_ui.m.secondScreenManager.SecondScreenManagerModule;
import com.lkm.frame.module.ConditionConfige;
import com.lkm.frame.module.ModuleDelegate;
import com.lkm.frame.module.ModuleManager;



@Deprecated
public class SecondScreenManagerModuleDelegate implements ModuleDelegate<SecondScreenManagerModule,Void> {

    private ModuleManager mModuleManager;
    @Override
    public void init(ModuleManager moduleManager) {
        mModuleManager=moduleManager;
    }

    @Override
    public void dependency(DependencyConfig dc) {


        dc.addDependency(DisplaySecondModule.class);


    }

    @Override
    public void configure(ConditionConfige<Void> cc) {

    }

    @Override
    public SecondScreenManagerModule execute(Void aVoid) {
        SecondScreenManagerModule secondScreenManagerModule=new SecondScreenManagerModuleImple((DisplaySecondModule)mModuleManager.loadModule(DisplaySecondModule.class));
        return secondScreenManagerModule;
    }

    @Override
    public Class<SecondScreenManagerModule> getModuleInterfaceClass() {
        return SecondScreenManagerModule.class;
    }

    @Override
    public void onError(ErrorWarp e) {

        SystemLogger.onModuleError(e);
    }
}
